package com.zeus.gen.generate.service;

import com.zeus.gen.base.service.BaseService;
import com.zeus.gen.generate.model.DbColumn;
import com.zeus.gen.generate.model.DbTable;
import com.zeus.gen.generate.model.Generate;

import java.util.List;

/**
 * @author liuwei
 * @date 2018/8/7 11:18
 */
public interface GenerateService extends BaseService<Generate> {

    /**
     * 查询表信息
     *
     * @param tableName
     * @return
     */
    DbTable queryTable(String tableName);

    /**
     * 查询列信息
     *
     * @param tableName
     * @return
     */
    List<DbColumn> queryColumns(String tableName);

    /**
     * 生成代码
     *
     * @param generate
     * @param tableNames
     * @return
     */
    byte[] generateCode(Generate generate, String[] tableNames);
}
